import 'package:flutter/material.dart';
import 'package:p_location/common/constant/color_list.dart';

class LookAllView extends StatefulWidget {
  final bool isHiddenLIne;
  final Function onTap;

  LookAllView(this.isHiddenLIne, this.onTap);

  @override
  _LookAllViewState createState() => _LookAllViewState();
}

class _LookAllViewState extends State<LookAllView> {
  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: () {
        widget.onTap();
      },
      child: Container(
        padding: EdgeInsets.symmetric(vertical: 15),
        color: Colors.white,
        child: Stack(
          children: [
            Offstage(
              offstage: widget.isHiddenLIne,
              child: FractionallySizedBox(
                widthFactor: 1,
                child: Container(
                  color: Color.fromRGBO(0, 0, 0, 0.1),
                  height: 0.5,
                  child: Text("12"),
                ),
              ),
            ),
            Row(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                Text(
                  "查看全部",
                  style: TextStyle(color: ColorList.BLACK_45),
                ),
                Icon(Icons.keyboard_arrow_right,
                    color: ColorList.BLACK_45,)
                /*IconButton(
                    onPressed: () {
//                                      NavigatorUtil.push(context, EmergencyManageTab());
                    },
                    icon: Icon(Icons.keyboard_arrow_right,
                        color: ColorList.BLACK_45))*/
              ],
            )
          ],
        ),
      ),
    );
  }
}
